It is usually a good idea when writing to a company to find out ahead of time just who you need to talk to. Thus, the salutation "Dear Sir or Madam" should be avoided.
Maybe I'm lazier than RonBee, but I use 'Sir or Madam'. I don't like the 'Sir' version as it seems not to reflect the realities of the modern workplace.
TDOL, doesn't it depend on whether you are aware of their gender?
If you knew that, you might know their name, too.
Straightly speak it is just "Sir", but in today's PC world it is accepted that you can use either.