Hi,
There are optoisolators with two LEDs connected antiparallell to each other. With one of those a couple of resistors would be all that is needed. Make sure the resistors can handle the peak voltage across them!