Topological defects in solid-state materials are crystallographic imperfections that local perturbations cannot remove. Owing to their nontrivial real-space topology, topological defects such as dislocations and disclinations could trap anomalous states associated with nontrivial momentum-space topology. The real-space topology of dislocations and disclinations can be characterized by the Burgers vector $\mathbf{B}$, which is usually a fixed fraction and integer of the lattice constant in solid-state materials. Here we show that in a dielectric photonic crystal---an artificial crystalline structure---it is possible to tune $\mathbf{B}$ continuously as a function of the dielectric constant of dislocations. Through this unprecedented tunability of $\mathbf{B}$, we achieve proper controls of topological interfacial states, i.e., reversal of their helicities. Based on this fact, we propose a topological optical switch controlled by the dielectric constant of the tunable dislocation. Our results shed light on the interplay of real and reciprocal space topologies and offer a scheme to implement scalable and tunable robust topological waveguides in dielectric photonic crystals.