The phrase seems to first appear in Beadle�s Half-Dime Library copy of Deadwood Dick, the Prince of the Road ;or, the Black Rider of the Black Hills... a dime novel of the 1880's here in the western U.S. It's use in this particular publication had racial overtones, since, in context, it was used to describe a black man in the novel.
The phrase has persisted over the years. I heard old cowboys on our ranch when I was a child say the full phrase, which was "... He was a ring tailed tooter and real straight shooter..." Usually in admiration of someone, though one couldn't tell it from the usual scatalogical humor associated with the phrase as used by these guys...