The charge and brake light flickering is a very common occurance when the alternator brushes are going out. See this article for replacing the brushes.

http://www.4x4wire.com/toyota/maintenance/alternator_brushes/

Resist the temptation to swap out your quality factory alternator for a cheap rebuild, most here will strongly suggest just replacing the brushes on your current alternator.