We have investigated GaAs/AlGaAs nanowires capped with AlGaAs layers for optical device applications. GaAs nanowires are not so stable during AlGaAs capping growth at high temperature. However, AlGaAs nanowires retain their shapes, and GaAs nanowires sandwiched between AlGaAs wires were capped at temperatures as high as 700°C. The capped structures showed sharp photoluminescence peaks at around 730 nm at 4 K, which originated from excitons in quantum wires. We confirmed that the AlGaAs capping layers were grown smoothly around nanowires so that surface recombination centers in GaAs nanowires were reduced compared with air-exposed GaAs wires.