You do know that basically the GPS already behaves like this? If you have the GPS enabled, it's only actually on when it it's being used to fix your location. The other 99.9% of the day it's off and not using any power.
That being said, and you really want to enable/disable you're GPS, tasker can do it.