I've telecommuted off-and-on for about 1/4 of my 20 year career, so I've seen a lot. Some people can just pull off telecommuting and some can't.
I've never seen the situation described in this post, though, I can see how it might happen. Maybe I've just gotten lucky: telecommuted for the right companies, the right mix of people (including management), etc. Most teleworkers who have been perceived as goof-offs are, most of the time, goof offs.
But I think it has more to do with the way I work.
I'm a "productive burst" kind of developer. I can't just sit and develop all day long. My productivity goes in bursts. And because telecommuting allows me to get rid of the "chaff" that builds up in my life (like laundry, for example, why, yes, I can design software while sorting my whites from my colors, thank you very much), freeing me up to really make good use of my time when I'm in front of the computer (i.e., I'm not mentally churning on some stupid personal task). So when telecommuting, I'm very very productive and that is demonstrated in the level of work I am able to get done as a result.
Some of the commenters do have a point, though, that if you're mediocre, you're perceived as a goofball. If you're good, you're perceived as mediocre, etc. You get a sort of "telecommute bump-down" in perceived competence. That may be partly the managers' fault (as has been pointed out). But I think as a teleworker, you have a responsibility to make sure the work you do is visible. If you're not able to demonstrate that, maybe you're not as good as you think (sorry to break it to you).
But all in all, my work speaks for itself. And yours should too. If you can't demonstrate productivity when telecommuting, you shouldn't do it. Go on into the office, huddle around the water cooler and talk smack about the boss like all the other sheep. Go on, now. Get! :-)