One option is to use the MSBuild task to perform the configuration transformation. From Transforming a web.config file for deployment you can call MSBuild to do the transformation by invoking the TransformWebConfig target:
MSBuild Project.csproj /t:TransformWebConfig /p:Configuration=Staging
In BuildMaster, you can use the "Build .NET MSBuild Project" Action instead of the "Build .NET Application" action, and then pass in these parameters.