I had a similar problem a few weeks back, turned out to be a dodgy brake bulb at the back ( dont forget the handbrake light also lights up when a brake light bulb has gone) took me ages to find the problem, changed the bulb even tho the original one worked ok and it has been fine ever since.
hope this helps
Phil