Surely it would make the Games more interesting. However, A1GP already puts various countries racing against each other. On the other hand, making motorsports part of the Olympics could bring more countries to the series. For example, it could bring Spain, Finland, etc... countries that were never in a A1GP season, or bring back Japan, Austria, etc....
The competition could take part in one track of the country hosting the Games. Like, Shangai for this year's Olympics, and the teams, lets say, could have four drivers, and each one runs one race. At the end of the races the teams gets points according to their finishing order. At the end, the team with most points wins the gold medal. It's basically like what happens in sail, isn't it?
The other option could be a 24h race.
The problem with having F1 drivers participating in it is because F1 teams don't let their drivers run in other races outside F1. I guess this happens since the early 90's.
It's been a long time ago, but I think that in 1992 the Moto GP race held at Barcelona was named as the Olympic GP, but since I was 7 years old at the time i might have confused it by the European GP (lol). But then again (since I'm Portuguese), there's a big difference in pronunciation between "Olimpico" e "Europeu".
Cheers.