This is possible out of the box using Visual Studio 2010. The only caveat is this process is run from within Visual Studio when you use the Publish facilities within it. You won't get the ability to get this transformation from MSBuild (which hampers automated builds).
<appSettings xdt:Transform="Replace"> <add key="ProdKeyA" value="ProdValA"/> <add key="ProdKeyB" value="ProdValB"/> <add key="ProdKeyC" value="ProdValC"/></appSettings>
Source: Web.Config Transformations VS 2010
Also ensure your Web.Config.XXXX tranformation file matches your build definition. For instance, debug and release are supported by default so you would need to have a Web.Config.Release to adjust the Web.Config when publishing in release mode.