We have fabricated optically active semiconductor wires based on CdTe/CdMgTe quantum well structures by electron beam lithography and wet chemical etching. Wire widths between 5 and 40 nm have been achieved. The wires have been characterized by photoluminescence spectroscopy. Down to about 300 nm, no significant decrease of the photoluminescence intensity is observed at 5 K. In narrower wires, free excitons can diffuse to the open wire surface and recombine nonradiatively thereby causing a reduction of the quantum efficiency. Increasing the temperature up to 100 K causes a larger diffusion length of free excitons which leads to a reduction of the quantum efficiency in small wires. Bound excitons, which cannot diffuse towards the wire surface, show significantly higher luminescence efficiency in narrow wires compared to free excitons.