I guess I was already sensitive to the subject since a guildie whispered me the other day with similar thoughts. She's someone I don't really know much about other than that she's been in the guild for a fair while now but still appears to be a perpetual newbie as far as her knowledge about the game is concerned. She's got a death knight at max level and was working on her priest alt, whispering me to ask some very basic questions about priesting, such as: "I've seen some priests turn into a shadow, how can I do that?" I tried to provide helpful answers... until she suddenly asked me if I could also loan her a thousand gold so she could buy dual spec. Sorry, what? You don't have a thousand gold after several months of being level eighty, don't really know me and want me to give you a loan? You don't even understand the talent options for priests yet but want to dual spec? Somehow that strikes me as wanting to learn how to ride a bicycle before you've even figured out how to walk.
So, for anyone who might find this by googling "How do I get enough gold to buy dual spec at level forty" or something similar, let me tell you: just don't!
Dual spec was implemented as a feature for people who a) have lots of money to burn and b) are playing in such a way that it really pays off to be able to switch between two very different specialisations on the fly (for example by being a raider who has to be able to fulfill two very different roles within the same raid instance). If point a) doesn't apply to you by level forty, then b) definitely doesn't either. And it's really no big deal!
First off, your spec really doesn't matter all that much at level forty - you'll still be able to do anything that your class is meant to be capable of in general, regardless of where you put your talent points. You can heal as an enhancement shaman, tank as a balance druid, whatever. When in doubt, choose a dps spec and you'll be fine all around. Your talent choices shouldn't really start to matter too much until level sixty or so, and even then you can still scrape by quite well as an off-spec.
Also, what a lot of people seem to forget these days is that you can still respec normally without having dual spec. The first time it only costs a whopping one gold too, and it only increases up to a cost of fifty if you do it frequently. Want to try tanking Ramparts but don't think your fury spec will cut it? Give one gold to the trainer, click some buttons and wham, you can be a protection warrior too. Yes, it's a bit annoying that you can only do so in a capital city, but since you can teleport straight to battlegrounds and instances these days it's really not that big a deal.
So yes, if you don't have enough cash to afford dual spec while levelling, simply don't worry about it! For a long time you'll be able to fulfill any role as any spec (if in doubt about your soloing capabilities, go with a spec focused on damage), and if you do feel like experimenting, a normal respec is only a few gold away until you feel more certain about which talents you want and about how to earn the money for the more advanced bonus features!
People just don't appreciate how easy it is to get things done in this game even without having all the bells and whistles. Back in my day, respeccing at all required you to walk uphill in the snow both ways... and we still liked it!