I haven't tested this, but this doc indicates it's possible to configure flow-throgh/flow-around at the dial-peer level.
http://www.cisco.com/en/US/docs/ios/voice/cube/configuration/guide/vb-gw-sipsip.html#wp1324447
The catch is that you wouldn't be able to have the CUBE determine whether the call needs a transcoder or not. You'd need to know those requirements beforehand, and create a dial-peer matching strategy to encompass the various scenarios you're looking to drive.
So if the CUBE is connecting a specific platform to another specific platform, you could match it with the dial-peer, and then use that media flow-around config for it (or not, as appropriate).
If you need to make this determination on-the-fly, I don't think it's possible, and doing it per endpoint wouldn't really scale well.