It is completely acceptable to dress informally while travelling around Namibia. In fact many locals go out to dinner dressed in shorts and T-shirts, so it is unlikely you will offend anyone with your dress sense.
We are however a polite nation and believe that it is important to greet people and generally be polite to each other. Tourists would do well to remember this and to say 'hello' and shake hands with as many people as they can when entering a new location.
When dealing with anyone any authority it is best to remain calm and polite (even if the official does appear to be a bumbling idiot). Your warm smile, helpful attitude and friendly face will generally help overcome most issues.
As Namibia has become increasingly multicultural and tolerant over the last two decades slip ups in etiquette are likely to go un-mentioned. On your leaving a situation the locals may amuse themselves at the expense of your gaff, but it is unlikely major offense will be taken.
Of course to prove that there are two completely different takes on etiquette in Namibia here is the version from the Namibian Tourism Board Website / Travel Tips Section (as of June 2009)
Etiquette: Suits should be worn in winter, safari suits in summer. Prior appointments are necessary. English is widely spoken in business circles. The best times for business are February to May and September to November