Optimal algorithms for well-conditioned nonlinear systems of equations