Stalin was a sociopath, but a very effective one.
Yes, sociopath and capable are not mutually exclusive.