This idea has been kicked around for several years in West Coast states. Electric cars and small hybrids used highways, roads, and streets, but pay little in gas taxes. That latter is the "problem". State governments want the money (the taxes supposedly collected to build and maintain highways, etc. tend to get diverted to mass transit boondoggles, CA's high-speed massive-bullet-boondoggle, and social programs, so maintaining and improving roads isn't the real concern in this).
Speaking hypothetically, I would have no problem with the basis for taxation being switched from gallons purchased to miles driven. Realistically, I know legislators cannot be trusted not to do both, i.e. add a per-mile-driven tax on top of the unchanged per-gallon tax. I also do not trust legislators not to implement a per-mile-driven tax in a way that would enable government to monitor where car owners drive.