No doubt opiates lead to reduced libido, but the link between testosterone and libido is not as clear-cut as one may think. The naive layman's interpretation is that testosterone is what makes men "manly" (while estrogen is what makes the females so feminine) ... but like most things in medicine, the truth is nowhere nearly that simple and tidy. Both men and women have both testosterone and estrogen in their systems, although they play different roles. I can't really explain it any better because I don't understand it myself, but I'll say that if there is some sort of link between opiates and testosterone I wouldn't be surprised in the least.