Relay and back EMF

Why not use an optoisolator ?

or was that ruled out?