4.7 Ohms is way too small. You need at least 100 ohms.
V = I*R
The optos LED is most likely 2V@10mA. Since the battery is 3V, the drop across ther resistor should be about 1V. For 10mA, this would be R = V/I = 1V/0.01A = 100 Ohms.
With a 4.7 Ohm resistor, you are probably sourcing 100+ mA and draining the battery real fast.