I haven't modified and repacked a game sucessfully yet, but your best shot is to find the theme in the sound of the 3ds version. If it is a bcstm file, you are in luck. Just find the mp3 or wav of the N64 fire temple theme, and follow the looping guide for themes, and replace the file. Then try to repack it.
Probably doable, not easy (unless you know what you are doing, unlike me ^^)