Update for 1.8 and after
Update 1.8 added a 1/16 meter high hitbox to carpets, which made natural mob spawning on carpets impossible. Carpets are now safe.
Thanks @TomášZato for bringing this up!(There still are some types of "unnatural" spawning that are able to force mobs into carpets, like Village Sieges.)
Before 1.8
Carpet both does not prevent and does not facilitate mob spawning, but it does help in a way.
Carpet is a non-solid block, so, in terms of algorithm, mobs do not spawn on carpets, but rather in. Basically, you can replace all carpets with signs for the same, but more obvious, situation.
Mob spawning alrotihm, simplified, is the following:
What it means regarding carpets: if you have a level floor in a room, and room is surrounded by solid stone, no mobs will spawn even in the dark, as there are no air blocks on floor level. If you have a building surrounded by air, though, mobs will be able to start spawning outside and "leak" onto your carpet floors.
So, glass floors are as safe as they ever were.
Detailed algorithm is on the wiki.