Using two power supplies to power microcontroller
Your circuit will work as expected.

Diode: You should use diodes with low forward voltage drop, to reduce power dissipation.

Also you need some caps around the 7805 to stabalize it's regulatoin. However in this case I would suggest the usage of an DC/DC converter like the TSR 1-2450. It's a plug and play replacement for the 7805.