Foster and Smith Aquatics sells a product called Seaview Gel that's used to attach aquarium backgrounds. From what I've heard though, sometimes it works and sometimes it doesn't.
One of the ways to guarantee you don't have bubbles is to paint the background on, have you considered that?
