optical isolator is a circuit which uses couples a particular input on one part of the circuit to another part of the circuit without any physical connectivity.... it uses a LED in the input side and the device used on the other side varies one of its parameter in accordance with the LED emission and this is how the coupling takes place....
Practically, you can use one of the 2 solutions suggested by IanP and antedeluvian: Both of circuits of resistor with zener diode and resistor divider are simple and reliable.