Engineering teacher recommendation

Would an engineering teacher recommendation be okay for schools like Caltech/Stanford that want a math/science teacher recommendation???

I would say that you should get the math/science recommendation. While engineering involves these I wouldn’t risk putting your application at stake.