I have built a conveyor belt for my son out of Lego Technic. Now, I would like to add a simple optical switch, so that the belt stops when an object arrives at the end of the belt... However, I am not sure about which part I should use for that.
I'm assuming from your question that you are currently using Power Functions parts to control your conveyor. In order to achieve the sort of electrical automation that you are talking about, you'll need something like LEGO Mindstorms. The current line is called EV3. You'll need at minimum the Intelligent Brick, a light sensor, a motor, and a few cables. You can also buy the complete EV3 kit.
If that seems too pricey for you, you could try searching for used NXT (previous version), or even RCX (first version) Mindstorms kits.
Once you have the Mindstorms parts that you need, you'll just need to program the brick to do what you want using software on your computer.
I'm not aware of an official LEGO Power Functions optical switch but considering that PF is based on simple electric components it could probably be hacked together at the cost of sacrificing an official PF power cable for the connectors. I have no reliable information about the exact voltages, currents and possible signals used in the PF system but I'm pretty sure these can be acquired easily from the net. After finding out these you'll only need an off-the-shelf optical gate sensor, some wires, the necessary resistors, a cut PF cable and some soldering to produce a component that you described above.
It could also teach your son about basic principles of electronics and DIY, meanwhile awakening his curiosity to stepping out of the predetermined boundaries and hacking things (in the positive meaning) to achieve what he needs.