Control of photon transport properties in nanocomposite nanowires