Democrat lawmaker apologizes for 'Uncle Thomas' tweet