Gating a single-molecule transistor with individual atoms