TMZ has learned a gay cop will file a complaint against his department, after he was denied the right to march in uniform Sunday in the West Hollywood Gay Pride Parade because it would bring "discredit" to his department.

Gloria Allred is repping the California officer, who made a written request to march in uniform with other gay law enforcement officers and citizens. Allred says the Department responded IN WRITING that the march would be a "discredit" to the cop shop. Yes, in writing -- stuuuuupid.

Allred will hold a news conference Tuesday at 11 AM PDT in her L.A. office and the cop will appear.

We're told the cop will announce he's filing an employment discrimination complaint against the department based on sexual orientation ... though Allred won't reveal which department she's targeting until she takes the mic.