Heisenberg's uncertainly is actually that the uncertainty of position times the uncertainty of momentum is equal to h-bar. For a massive particle, the momentum at low velocities is mass times speed. This is not true at velocities near the velocity of light, where the proper expression is mass times v over the square root of (1-v squared over c squared), where v is the velocity and c is the speed of light. So, as the velocity gets near c, the velocity of light, this expression goes to infinity. No matter how small the mass, by going near c, we can have any momentum we wish. Even in the limit where the mass goes to zero, ie for a photon, the momentum is non-zero.
A more sophisticated answer would be to point out that really electromagnetism is a field, and although one talks about photons as if they were particles, they are not, they are one limited manifestation of the quantization of that electromagnetic field. Asking for the position of the field really makes little sense (just as asking for the position of a wave in the water makes little sense.) Heisenberg's uncertainty relations for the electromagnetic field have more to do with the simultaneous observability of the electric and magnetic fields at the same time, rather than the position and momentum of the putative particle, the photon.