Shadows in camera tracked scene
This isn't a complete solution, because it doesn't work for the ambient occlusion, but you can get rid of the shadow in compositing.

Create a emission Material, with the Backfacing output of the Geometry node fed into the Color in the Emission node.



Then create a new render layer, that includes the same layers as the Background layer, but replaces the materials with this new one, using the Material option in the render layer panel (you still want no materials on the actual objects, to keep the correct shadow calculations).



In compositing, use a Mix node with an Add blend mode to combine this render layer with your shadow/AO nodes.