I'm a fan of the Etymotic brand ear plugs (which I wear when I ride) and I have a set of Etymotic's ER-6 headphones, but they block too much ambient sound and I fear that would be risky business even without a the music on. Mrs. T has since confiscated them for use on the riding mower with her Nano. If you keep the tunes low enough to hear the sounds around you I can't think of a reason why it wouldn't be okay.
Etymotic