We have developed a new mask molecular beam epitaxy (MBE) technique that allows successive selective and non-selective growth to be carried out in a chamber using a movable mask. Grown layers have high crystal quality without contamination. This technique is used to monolithically integrate vertical-cavity surface-emitting lasers and double vertical-cavity photodetectors used for optical interconnections. A low threshold current is obtained in the surface-emitting laser and a large bandwidth is obtained in the photodetector.