40 Glocc is close to seeing the light at the end of the tunnel in his prostitution case ... he's just cut a plea deal with prosecutors. According to court docs, obtained by TMZ, the rapper has agreed to plead guilty to 1 felony count of promoting…