Have a look at this Creating a WIX Installer for ASP.NET Web Applications
The code section for the asp.net version
<!-- Switch ASP.NET to version 2.0 -->
<CustomAction Id="MakeWepApp20" Directory="MYWEBWEBSITE"
ExeCommand="[ASPNETREGIIS] -norestart -s W3SVC/1/ROOT/[WEB_APP_NAME]"
Return="check"/>
<InstallExecuteSequence>
<Custom Action="MakeWepApp20" After="InstallFinalize">
ASPNETREGIIS AND NOT Installed</Custom>
</InstallExecuteSequence>
It's the CustomAction that sets the version of ASP, you could create a condition that will run the right CustomAction to Switch between versions. Here's a link to switch versions.
HTH