Heterotic string theory with background fluxes