Heating samples with precise temperature control