Is it the same lamp that comes on with the handbrake? Or the other one that says 'brake lamp'?
Brake lamp warning is based on the current draw from the different brake lamps. If one has a dirty or corroded bulb socket, it can set off that warning. Sometimes even working bulbs that don't match each other...
And... Are you actually checking the BRAKE lamps, or are you simply looking at the parking lights? Working parking lights don't mean the brake lamps are OK.