WiX supports reading enviromental variables, and has some useful preprocessors like ifdev. You can use your build script to set the environmental variables first. WiX compiler will substitute the environmental variables defined in your WiX file with the actual values you set.
For example:
<?ifdef $(env.BUILD_TYPE) ?> <?define ROOT="$(env.APP_ROOT)\bins\$(env.BUILD_TYPE)"?> <?else?> <?define ROOT="$(env.APP_ROOT)\bins"?> <?endif?>