Two firefighters have been killed and another wounded after they were ambushed by sniper fire while responding to a blaze in the US state of Idaho.