When it comes to NEC, it is far easier to say what you can't do, rather than what you can. Each planning agency, inspection department, and even individual inspector, may have a slightly different interpretation of what the code says.
In this specific case (a lighting wall switch), the code calls for an ac/dc general purpose snap switch. Under "strict interpretation", would preclude a DC only switch. It definitely forbids the use of an "AC only" switch.
AltE has a switch here:
http://store.altenergystore.com/Enclosures-Electrical-and-Safety/Miscellaneous-Electrical-Parts/Switches/DC-Switches/DC-Surface-Mount-Switch/p2356/You can also ask your local supplier (Electrical Supply house, NOT Home Depot or your local hardware store) for a switch that is certified to meet the "ac/dc general purpose snap switch" requirement.
James has pointed out a couple of good alternatives.
Using a switched DC lamp (w/o a wall switch) would be another. The switch for a switched device falls under a different NEC/UL classification, than the "wall switch".
Another one is buy an inverter (even an inexpensive one). Then you can use the “AC Only” devices.
I am eager to hear what John Wiles (the real expert) will say. He addresses many code issues for solar systems.
http://photovoltaics.sandia.gov/docs/John_Wiles_Code_Corner.htmKen