With the white paint, it is hard to see how the pins are connected on the bottom of the 8 pin chip. If 4 are shorted together on one side, and three on the other side with one pin that is on its own, then it looks like a mosfet. The 4 shorted pins will be the drain, the 3 shorted pins the source, and the single pin the gate.
Definitely not an optocoupler - all the 4 pin chips are the optocouplers.
Richard