Formation of Ultrashort Laser Pulses with the Aid of a Two-component Medium