Image sensor with new trench-gated phototransistor