You've stepped on a potential land mine of debate there. Whether or not 外人{がいじん} is offensive, politically incorrect, or means something other than just "foreigner" is the topic of a lot of heated debate. Take a look here for the "gaijin is offensive side". Take a look at the Wikipidia entry for links to the "gaijin is just a word" side.
Which means that for starters, it can't simply be taken as axiomatic that 外国人{がいこくじん} is more politically correct, which makes answering your question a little tough.
As far as I know, NHK and news programs favour the use of 外国人{がいこくじん} over 外人{がいじん} because it is considered more politically correct. However, if you look at the links in this answer, 外人{がいじん} does not seem to be on the list of "unbroadcastable" words (although the lists linked to are unofficial, so perhaps broadcasters have their own in house rules).
The Wikipedia entry you (and I) link to covers a lot of the history and two sides of the issue, so there's no need to retread them here.
I think that for the purposes of this site and wondering about usage in Japanese, you can't be given hard rules on this one. I think the guidelines you need to consider are:
Some people do find it offensive, so know your audience.
Most Japanese are unaware that it is an issue, simply because foreigners in Japan are such a tiny minority that most issues relating to foreigner relations go under the radar for most Japanese.
Whether offensive or not, the word is most often understood to mean non-Chinese, non-Korean foreigners.
Personally, I feel it is too simplistic to simply assert that a word like 外人{がいじん} is or is not offensive. People seem to want to put the entire burden of responsibility on either the speaker or listener, on intent or perception, but I believe language is a relationship in which two parties participate in understanding. So 外人{がいじん} can be made offensive, or not, it can be understood as offensive, or not. If you and I were having coffee together, I could show you how I can take a neutral word like "woman" and use it as a weapon. But that becomes part of a broader debate about language and social norms. Too broad to cover here.
gaijin(andgaikokujinto a less extent) are accepted as English words? I didn't know that. – sawa Dec 31 '11 at 18:57