No, .NET Framework 4.0 is not supported yet. So, you have to wait for the next major release. If it is must for you, we recommend you to develop a web service that uses .NET Framework 4 and then connect to it from SharePoint. All server side customizations for SharePoint 2010 still need to be the .NET Framework 3.5 or the .NET Framework 3.5 SP1.
Check out the
Requirements for Developing SharePoint Solutions.