Vertical-cavity optical AND gate