NBA legend Kareem Abdul-Jabbar was inspired by Rachel Dolezal ... and even Caitlyn Jenner ... to step forward and reveal a huge secret of his own.

Kareem said, "I've decided to come out with the truth. I am not tall (#shortstuff)" ... in a Time article.

The absurd, and clearly tongue-in-cheek confession ... came in an op-ed piece Kareem wrote about Dolezal ... hours after her resignation from her NAACP presidency. Abdul-Jabbar added, "Although I've been claiming to be 7'2" for many decades, the truth is that I'm 5'8"."

Seriously though ... Kareem gives Dolezal props for all she's done for the black community, and suggests she should get a pass for her white lie -- or as he put it, "a Bill Clinton Get Out of Jail Free card."