We recently had to assemble a few Blinky kits and found a quick and easy method of soldering the optical sensors.
The best way appears to be to first bend the leads by 90 degrees. Use a pliers and pinch the leads directly below the sensor body. Use the fingers of your non-pliers hand to bend the leads by 90 degrees. Be sure that you’re bending them the correct way, as the two sensors have different orientation (C sensor has longer lead on left, while D sensor has longer lead on right).
After the two sensors have been bent, drop them into their corresponding holes in the printed circuit board (PCB). If you suspend the PCB using a vice, then the sensors should stay in place, oriented so they are pointing away from the circuit board. Use a soldering iron to carefully solder each pin. If the sensor gets crooked while soldering, use the solder to gently nudge it back into place (while continuing to heat the soldered pad).