Yes, you can - in fact, you have to, because the receipt has to be included with your application before you send it in.
Technically you don't have to shell out the full $1040 right away, because it's two different fees - $490 for the RPRF, which can be paid either upfront or later, and $475 +...