Is it ok to show my cards when I know I I’m the only one with spades left
The rules (in most spades rulesets) prohibit showing your cards, yes. 

That said, what you describe is a pretty common practice in friendly games, as (as you note) the rest of the hand's play is foregone.

Note the Wiki entry's inclusion of the TRAM section (added in 2012, with no cited sources) also includes a paragraph on penalties for doing so prematurely -- penalties ultimately derived from the fact that showing the cards in your hand before playing them is not allowed.

None of the rules for spades that I've found (including all of the ones cited in the wiki page for Spades) allow it. Indeed I've only found one that mentions it at all, and it does so only to disallow the practice explicitly. From The Spades Connection:


  Each hand must be played to completion rather than announcing the rest
  are mine to avoid potential scoring errors. 
  
  Cards dropped from any player's hand, (revealed to any other player)
  should remain face up on the table and played at the first
  opportunity.