Topology optimization for transient thermoelastic structures under time-dependent loads