A guess at the mechanism: the silk protein selection algorithm is an accept-first filter, the silk ducts being somewhat like human mammary glands. Anything the spider isn't specifically pulling back into its own blood as needed would then end up as an impurity in the webbing. (Easy experiment to do in its own right, but from a quick search I can't find evidence to support or refute it.)
Past that, the nanotubes just have to get locked into the matrix of the silk in the right orientation... which could just happen to anything of the right dimensionality in the silk as it anneals into shape.
This reminds me of a story of dolphins, who apparently suffer a lot from mercury poisoning, mostly caused by the smog of unfiltered coal plants entering their ecosystem. One issue of mercury poisoning is that the body has no way to get rid of it - it gets stored in the fats, IIRC. Unless you're a mammalian mom. Then the body gets rid of mercury through your milk. Mercury is most lethal at the infant age. So in short, most dolphin mothers' firstborns die [0].
Anyway, perhaps the carbon fibers are actually toxic, and the only way the spiders can get rid of the material is through their silk?
Past that, the nanotubes just have to get locked into the matrix of the silk in the right orientation... which could just happen to anything of the right dimensionality in the silk as it anneals into shape.