Pulse engineering for population control under dephasing and dissipation