Sure, you only must be consistent with your convention or, most elegantly, set ##c=1##, as the particle physicists do (see the postings above). If I keep ##c \neq 1##, then I usually prefer to use the convention that the four-vector quantities have the dimension of the spatial parts, i.e., for momentum
$$(p^{\mu})=\begin{pmatrix} E/c \\ \vec{p} \end{pmatrix},$$
where ##E=c \sqrt{m^2 c^2+\vec{p}^2}## is the relativistic energy (i.e., kinetic + rest energy) of the particle. Then the energy-momentum relation (often called "on-shell condition") can be written in manifestly covariant form as
$$p_{\mu} p^{\mu}=m^2 c^2.$$
For the photon of momentum ##\vec{k}##, following thie convention you have
$$(k^{\mu}) = \begin{pmatrix} |\vec{k}|,\vec{k} \end{pmatrix}.$$
Because it's massless the energy of the photon is ##E_{\gamma}(\vec{k})=c |\vec{k}|##.