Yes, techniques for doping of materials with well-defined concentrations is the subject of a whole subfield of engineering... there are various techniques. A common method is to use a vapor of the dopant, which diffuses through a material. One can also use beams of atoms to implant them as dopants into a surface. Here's a Wikipedia article.