3D EM connectomics image volumes are now surpassing sizes of 1 mm3, and are therefore beginning to contain multiple meaningful spatial scales of brain circuitry simultaneously. However, the sheer density of information in such datasets makes the development of unbiased, scalable machine learning techniques a necessity for extracting novel insights without extremely time-consuming, intensive labor. In this paper, we present SynapseCLR, a self-supervised contrastive representation learning method for 3D electron microscopy (EM) data, and use the method to extract feature representations of synapses from a 3D EM dataset from mouse visual cortex. We show that our representations separate synapses according to both their overall physical appearance and structural annotations of known functional importance. We further demonstrate the utility of our methodology for several valuable downstream tasks for the growing field of 3D EM connectomics. These include one-shot identification of defective synapse segmentations, dataset-wide similarity-based querying, and accurate imputation of annotations for unlabeled synapses, using only manual annotation of 0.2% of synapses in the dataset. In particular, we show that excitatory vs. inhibitory neuronal cell types can be assigned to individual synapses and highly truncated neurites with accuracy exceeding 99.8%, making this population accessible to connectomics analysis. Finally, we present a data-driven and unsupervised study of the manifold of synaptic structural variation, revealing its intrinsic axes of variation and showing that synapse structure is also strongly correlated with inhibitory neuronal subtypes.