At the moment, I think that cycles will only render with the CPU, not GPU. (see Blender Bug Tracker)
If that works for you, then…
First, render your scene with cycles using a transparent background, which is found in the Integrator panel.
Go into the compositor, type shift+a to add a new node, and choose input–>movie clip. Follow this up with an alpha over node: color–>alpha over. Plug them together like this:
To be honest, I have not had to do a scene yet that also used shadows- but this can’t be that much harder. If you can do the above, then you’ll probably be able to mess around and get the shadows pass in there as well. Best of luck!