No, not directly. The next easiest way would be to put a low value resistor in series with the pump circuit, such that you get > .8V drop across it when the pump runs. Use this voltage to switch a transistor which drives current through the opto isolator, again power this transistor from the pump supply. If the pump(s) current take is variable, connect a pair of silicon diodes across this resistor(watch polarity). now with the pump current less then 1mA the transistor will be off, at moderate current (.01 - 2A) the drop will be .8V, with pump currents greater then this the volt drop will be less then 1.6V, because the diodes take the excessive current.
Frank