I don't see why FireFox is any different than any other program as far as Taskbar icons are concerned. I use SeaMonkey which is very similar to FireFox only it's a Suite, browser, email, html editor, etc. and the icons stack very nicely for me.
Right click on the Taskbar and select Properties.
On the Taskbar tab, make sure Taskbar buttons is set to Always combine, hide labels.