They can. In the mid-90's it was on the news that two women had plates that said LESBIAN and the DMV recalled them. The women protested that they were approved and had been on their car for months. But the DMV had gotten complaints from people that were "offended" and said the approval was an oversight, &c, &c.
To be fair, the plate in question said "2 DYKES," which, although they meant it in a fun, positive way, could rub some a bit badly.
Virginia's not good about pre-screening the vanity plates. They let a guy have a plate that said "ZYKLON B" on it (Zyklon B being the gas the Nazis used to kill Jews during the Holocaust) until someone noticed and complained. The man that owned the plates was a Holocaust denier who had served time for racially motivated crimes before.
Both are mentioned here.
Libertarianhaus says let people get whatever they want. If you want to get something racist and asinine as a plate, go for it. But don't go whining when someone slashes your tires and bashes your windshield in. I knew a guy (also in Virginia, natch) who had a plate that said "H8 GZUS." I asked if it ever frightened him what people would do in retribution. His response: "I hope someone trashes my car. I hate this piece of shit, and I could use the insurance to get a better one."