  Insulating quantum spin liquids can undergo a confinement transition to a
valence bond solid state via the condensation of topological excitations of the
associated gauge theory. We extend the theory of such transitions to
fractionalized Fermi liquids (FL*): these are metallic doped spin liquids in
which the Fermi surfaces only have gauge neutral quasiparticles. Using insights
from a duality transform on a doped quantum dimer model for the U(1)-FL* state,
we show that projective symmetry group of the theory of the topological
excitations remains unmodified, but the Fermi surfaces can lead to additional
frustrating interactions. We propose a theory for the confinement transition of
$\mathbb{Z}_2$-FL* states via the condensation of visons. A variety of
confining, incommensurate density wave states are possible, including some that
are similar to the incommensurate $d$-form factor density wave order observed
in several recent experiments on the cuprate superconductors.
