You may want to render only shadows in your scene and use the alpha channel to composite.
To create a shadow pass in the alpha channel using the Maya Software renderer
To create a shadow pass in the alpha channel using the mental ray for Maya renderer