So long as there is an external weather seal & the windows are sufficiently fixed, using expanding foam should not cause any problems. I would recomment the 'gunnable' foam as this gives you much more control on application. (little bit more expensive, but worth it)
Only fill the required gap about 30% and the foam will slowly expand.
(Always easier to add more foam later, than watching masses of foam expanding around your frames!)
Finally, cut away any excess & fix some PVC trims to cover the areas.
One thing i would add is that you should be complaining about the installation as the internal finishes should have been taken care of by the them!
If you still don't fancy using the foam, any insulating material can be used, and again simply buy some PVC trims internally to cloak the gaps.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!