The same way we fund it currently- by allocating money from the budget. While it may feel good to talk about "this tax pays for this program" it is not a law of nature that a decrease in a specific tax will lead to a corresponding decrease in funding for any particular program. On the contrary, it is commonly expected that an overrun in a particular tax will be spent elsewhere.
When the day comes that the revenue from the fuel tax has dipped low enough that the money needs to be replaced, I am quite sure we can come up with 300 other ways to allocate the tax burden appropriately.