yes it can be used with stepper drivers that have optically isolated inputs.
Any driver that is worth buying has optos built in.