50v will be fine, you can replace a cap in a circuit with one of a higher voltage rating no problem, if a circuit calls for 35v and you have a 50v no problem, up to an extent it will last longer.
The voltage rating of a cap is the most ot can withstand without failing, less that that is Ok.
If the optocoupler circuit was meant to have a cap like that it would make sense to be across pins 5 & 8 on the opto, pin 8 being +, but if your wires to the 'duino are not too long it probably wont need it, but wont do any harm.
I did some work for a pal back in the 80's on his layout, sounds like you can get more gizmos now, being able to remotely uncouple sounds cool.