In general, let us have a light emitting point A and two light absorbing points B and C, such that the three points fall on a straight line and B is somewhere between A and C. For simplicity, let us consider all photons emitting from A to travel along this same line in the direction of the points B and C. Also, let the distance from A to B be AB and the distance from A to C be AC.
For the photon, special relativity states that there should be maximum space contraction along it's direction of motion. That means that, for the photon, A, B and C are all at the same point in space. This results in the photon effectively "reaching" B and C at the same time. How then does the photon "decide" that it must be absorbed by point B and not C, so as to be consistent with what an outside observer would see (point B "casting a shadow" on point C)?