The work you prefer not to do is still your work if it has been assigned. You need to stop thinking of it as not your work. The job is to get the projects done that the company has not to play in your preferred tool/language only.

You don't get to pick and choose what you want to do especially if you have available hours. They are paying you for full-time and they expect full-time production from you. If you are faster than others to complete tasks, then yes you complete more work but there still should be no expectation that they will allow you to sit idle while other people are busy and there are tasks undone that you are capable of doing. This is not unfair. If you are being paid for full-time, then expect to be kept busy during the normal work hours.

It doesn't matter if you don't like the tasks as long as you are capable of doing them. Clearly if you are a developer for a hospital chain, you can't take over doctor's duties because you are not qualified and you would be justified in refusing those tasks., Just as clearly, you have no leg to stand on in refusing tasks that can be done in your preferred language or another language that you are expected routinely to know as part of your duties (such as many devs need to understand SQL even if it is not their main language).

The gray area comes in when the tasks are for tools and technologies you do not know but could learn relatively easily. In this case, you might be able to refuse the task if you can show the risk associated with having someone less skilled do the work and the added amount of time it would take to do the work.

Even if you make the case, management can still decide based on ongoing needs if they prefer to take the risk. For instance suppose you were a web developer for a medical device company. If they see the need is coming up for less web development work and far more embedded systems work, they may choose to take the risk to train you in the new specialty because it makes you more valuable to them and their expected future needs. Or they may choose to hire someone with that skill set and let you go as your workload goes down. This is often the scenario when a legacy system is being replaced.

So to address what to do. First accept other work graciously when it is given. No manager wants to deal with a prima donna who is too good to do the work they actually need to get done. Next, when you complete tasks, suggest other tasks in your preferred area before they assign you to the ones you would prefer not to have. By having a plan for what you should work on next, they aren't going to throw the next available task to you unless it is a higher priority. But in this business, priorities take precedence over preference and you need to accept that.

Next, sit down with your manager and express to him your preferences and where you want to develop your career. He can't guess what you would prefer to do, so you need to make sure that your preferences are known. A reasonable manager will try to accommodate preferences as far as he or she can, but in the long run, the work available is the work available whether it is your preferred task or not. It is good to make it clear that you are not refusing the tasks and you will do them willingly, just that you are asking he consider your preferences when possible.

Next you need to show your coworkers and particularly your boss how much value you add to the product and that what you do is not less skilled than what they do. So make sure that when you accomplish something, you discuss the complexity in team meetings. Also develop and offer training sessions on the tools you use which will show them the difference between what you do and what they do very nicely. Occasionally share articles about the types of things you do as general interest items. If you have a wiki, document some of the complexities of what you do.

In other words, do the tasks it takes to get credit for the difficulty of what you do and how you do it. Doing the work is not enough, you need to be political in showing the value of your work. Once you do that, then you will find it easier to get pay raises, promotions and better assignments.