X-ray spectra of plasmas created with ultrashort laser pulses