Question: Why can't photons have a mass? Could you explain this to me in a short and mathematical way?

Answer: 
The other answers explain that there's no paradox but they don't explain why the particular particle called photon is massless.

It's massless because it is the messenger particle responsible for electromagnetism which is a long-range force. Its range is infinite so the mass has to be zero. One may view the Coulomb potential as the zero-mass limit ($m\to 0$) of the Yukawa potential
$$V(r) = \frac{\exp(-mr)}{r} $$
OK, so why is it massless and why the range is infinite? It's because of the unbroken $U(1)$ gauge invariance for the electromagnetic field that acts on the electromagnetic gauge potential as
$$A\_\mu\to A\_\mu+\partial\_\mu \lambda$$
The mass term (in the Lagrangian) for a gauge field would have the form $m^2 A\_\mu A^\mu/2$ and it is not invariant under the gauge invariance above. The gauge invariance is needed to make the time-like mode $A\_0$ unphysical - otherwise it would produce quanta with a negative norm (because of the opposite sign in the signature for the timelike direction) which would lead to negative probabilities.

However, gauge fields may consistently become massive via the Higgs mechanism - like the W-bosons and Z-bosons. Then they lead to short-range forces. Beta-decay is mediated by the W-bosons.
In the context of special relativity, anything that travels at the speed of light can't have a nonzero rest mass. One way to see this is that the kinetic energy of an object of mass $m$ moving at speed $v$ is
$$
mc^2\left({1\over\sqrt{1-v^2/c^2}}-1\right),
$$
which tends to infinity as $v\to c$. Physically, this means that it would cost an infinite amount of energy to raise a massive particle up to speed $c$.

As far as special relativity is concerned, it's logically possible that photons do have mass and travel at speeds (slightly) less than $c$. (This would mean that the quantity $c$ that occurs in special relativity should not be called "the speed of light.") The experimental limits on this possibility are extremely severe, though.

I may have misguessed the level of your question and the sort of answer you're looking for. For instance, there are separate reasons for believing the photon to be strictly massless based on gauge invariance.