Heavy-ion optical potentials at finite temperature calculated using a complex effective interaction derived from a realistic force