No, you can't.
You have to shoot the same unit, so if you destroy the transport, the remaing weapons can't shoot the unit that gets out of it. In essence, all of a units shooting happens at the same time, so they all shoot the vehicle.
You are allowed to charge a unit that got out of a transport if you destroyed the vehicle though in shooting though.