You can get the connectors for the EDUBot header pins from
www.jameco.com.
The part numbers are:
100811 - 2 pin housings ($0.27 each)
157382 - 3 pin housings ($0.27 each)
100765 - female crimp pins ($0.11 each)
You crimp the pins to the wire then slide them into the housings. They have a little tab that locks them into place. You can get a pair of crimpers at Radio Shack, the kind with the square teeth at the front. These pins are crimped with the notch farthest from the handle. Buy 2x as many pins as you need, they're harder to work with than you think.
When you connect the optical sensor you need two pins: one to either NO (normally open) or NC (normally closed) and one ground.