I think it is fine, but you had better bring the old passport (invalid) and the new one to enter the US Consulate and then, use the new passport to apply for the visa.