Control of Legged Robots using Model Predictive Optimized Path Integral