Does Visual Studio 2010 work with MOSS 2007?
You can however use SPVisualDev that works with VS2010 for SP2007 solutions.
All of the Templates in VS2010 are designed for SP2010, and likely won't work for SP2007 without modification.
I know of no reason you couldn't create a project for SP2007 and do all the work that VS2010 does for SP2010 manually (Build the WSP, generate various Xml files), OR use WSPBuilder, or another 3rd party tool.
Edit: Johan is correct, SPVisualDev is what I was thinking of.