So long as it's only powder and not made up then that's fine.
I can say that pretty confidently as when it is manufactured it is turned from a liquid product into powder using a process called spray drying and that even a 'cool' process will be quite a bit hotter than 40 deg!
For a walkthrough of the facilities used to produce infant formula, GEA Process Engineering have a an article on the Production of powdered baby food.
Your biggest concern with infant formula is bacteria and they need food, moisture, warmth and time to grow. The drying process stops bacterial growth by removing the moisture so while the powdered milk remains a powder (and uncontaminated by water) it can be subjected to extreme conditions without becoming a health risk.