Gate voltage controlled thermoelectric figure of merit in three-dimensional topological insulator nanowires