If I'm going for HP Fire Tapu Lele, do its three guaranteed-31 IVs have to be HP/Def/SpD? I can determine whether its Spe is 31 since it would be 137 and I have a 136-Spe Registeel, so that's one factor.
Also, am I correct in assuming that if its HP at a 31 HP IV is 172/172, I need a Final Gambit Pokemon with 171 HP?
To answer your first question, 3 guaranteed 31's in HP, Def and Sp.Def and even numbers in Atk, Sp.A and Spe is the most optimal spread for Hidden Power Fire on Lele, but there is another IV spread that gives it Hidden Power Fire. If its guaranteed 31's are set to HP, Attack and Special Defense, it will also be Hidden Power Fire if the other IVs are even, but that means it spends one of the 31's in Physical attack, which means it'll take the most Foul Play and Confusion damage.
Also, since the Speed has to be even, you won't need a speed check if you're only going for Hidden Power Fire and the right nature, because even if the speed of it is 137, that could still mean it's 30, and if the speed is lower than that, it could still be an even number.
(also, I hope you're aware that 137 Speed is for Modest and other non +/-speed natures. When it's timid, its speed is 150 at 31 Speed)
To answer your second question though: yes, by using a mon with Final Gambit and 171 HP, you can automatically toss any non-31 HP Lele's, and none of the ones you tossed through Final Gambit would be HP Fire.