A characterization of the elements of the socle of a Jordan algebra