The rule-of-thumb saying D is right and L is left only works when the group above the chiral C in question is higher priority than the group below. For example, in glucose the above group is a 4-carbon chain while the group below is a mere CH2OH unit.
In this case, the phosphated group below is higher priority; so rotate the molecule 180 degrees in the plane of page to figure out the correct config.
Another way to think of this is to remember that usually the D configuration is pretty much the R configuration for the penultimate C whereas L is pretty much the S configuration - granted, D/L and R/S are completely separate systems (D/L refers to direction of rotation of polarized light while R/S is the physical organization of atoms around the chiral center), but this is still a good rule of thumb to keep in mind.
You're getting quite a few things confused here, so I'll try to systematically address them. First of all, D/L does
not refer to the direction of rotation of polarized light. These are capital D's and L's here. They represent the configuration of the molecule as compared to a standard, namely glyceraldehyde. Someone from long ago said, "L-glyceraldehyde looks like this and now we're going to call everything that looks like this L and vice versa for D." It has nothing to do with rotation of light.
Now, you were thinking d and l and you are correct that d and l refer to the direction in which a molecule rotates polarized light. d and l are equivalent to + and -. However, there is
no relationship between +/- or d/l and R/S. It is not the case that d is pretty much the R configuration. There is, in fact, no way to tell whether a stereocenter has the R or S configuration even if you knew whether the molecule (let's assume there's only one stereocenter) rotates light right or left. To see the absurdity of that claim, keep in mind that a molecule rotates light one way or the other,
no matter how many stereocenters it has. In other words, molecules have an overall handedness and that makes them rotate light one way or the other. So say you have a molecule that rotates light clockwise. Does it make sense to say that it's d or +? Sure. Does it make sense to say that it's R? Well,
what's R? The entire molecule? That makes no sense because R and S denote the absolute configuration about just
one chiral center. The molecule could have one stereocenter or ten. They're not all R or all S.