Numerical solution of the optimized random phase approximation