A quantum optical transistor with a single quantum dot in a photonic crystal nanocavity