The groups with exactly one class of size a multiple of p