Electrodes in close proximity to an active area of a device are required for sufficient electrical control. The integration of such electrodes into optical devices can be challenging since low optical losses must be retained to realize high-quality operation. Here, we demonstrate that it is possible to place a metallic shallow phosphorus doped layer in a silicon microring cavity that can function at cryogenic temperatures. We verify that the shallow doping layer affects the local refractive index while inducing minimal losses with quality factors up to 105. This demonstration opens up a pathway to the integration of an electronic device, such as a single-electron transistor, into an optical circuit on the same material platform.