Superconductivity and incommensurate spin fluctuations in a generalized t-J model for the cuprates