@the time traveller, do you know for a fact that these two light rays will arrive at the same time? If so, just speculation, you may need to look at the 'amount of space' on the curved path, as spacetime is curved by the massive body, space-time is curved round it so i can only imagine that the distance from one end to another may be 510.174 but a meter may be slightly smaller in the hugely curved regions.
Einsteins theory of gravity tells us why massless particles like photons effected by gravity, it is not an attraction of the matter as such, it is just spacetime is bent around the matter, and as photons are in our time and space, their paths get curved too.
The curvature of space-time at the event horizon will cause all matter and energy to accelerate towards the black hole at the ~3x10^8ms^-2, regardless of if it has mass or not