Optimal monetary policy, endogenous supply and rational expectations