Federal law requires that the person who fills out the paperwork be the person that is actually going to be the owner. There is no time limit on ownership. Someone buying a gift is actually the owner during the time they buy it until they give it away. It is legal to buy a firearm with the intent to give it to someone who may legally possess it.
Now, the issue is that many, if not most, gun shops are so paranoid about these laws that they will refuse sales to anyone they suspect is going to give the gun to someone else. So if you plan to do this, just keep your mouth shut about it while in the store.
EDIT: I just remembered this is not an option for you because federal law also prohibits buying a handgun in another state.
Other options include having him give you the money to cover it, and then you do the shopping and paperwork yourself. If you are under 21, as is often the case in these situations, this is not an option.