The ground loop filter not only removes DC bias, it elaiminates the closed path for AC return currents as well - DC wouldn't produce a hum. The hum comes from the 50/60 Hz mains frequency currents flowing the path of least resistance.
An optoisolator can interrupt the ground path, but is a very very very poor analog component. Optoisolators are typically used as digital parts, although analog optoisolators exist which, with a bit of circuitry around them can transmit analog signals with approx. 10-12 bit accuracy. For HiFi these are not suitable. You'd have to digitize the signal (A/D), the send it through the optoisolator, then convert it back to analog (D/A).