Think Smarter not Harder: Adaptive Reasoning with Inference Aware Optimization