If there are only two conjugacy classes, then it is easy to see that the group must be simple, since a normal subgroup is a union of conjugacy classes. Also, every non-identity element must have the same order, and this order must be a prime (otherwise the element would have non-trivial powers of smaller order). So the group is a simple p-group, therefore cyclic of order p. But these groups are abelian, so each element forms a singleton conjugacy class. Hence p=2 is the only possibility.