Yes, Smith addresses these issues in Book 1 Chapter 10 of The Wealth of Nations. Firstly, he notes that where two jobs are in almost every respect equivalent, we should expect them to pay the same wage:
"THE whole of the advantages and disadvantages of the different employments of labour and stock must, in the same neighbourhood, be either perfectly equal or continually tending to equality. If in the same neighbourhood, there was any employment evidently either more or less advantageous than the rest, so many people would crowd into it in the one case, and so many would desert it in the other, that its advantages would soon return to the level of other employments. This at least would be the case in a society where things were left to follow their natural course, where there was perfect liberty, and where every man was perfectly free both to choose what occupation he thought proper, and to change it as often as he thought proper. Every man's interest would prompt him to seek the advantageous, and to shun the disadvantageous employment."
This is related to the observation made by MH.Q: if A and B are two equivalent jobs, but A pays more then everyone would rather work in A than B. This results in a shortage of labour in B and/or an excess of labour in A so that the wages converge by natural market forces and the wage gap disappears.
Most of the rest of the chapter is spent discussing reasons why we might diverge from this ideal of uniform wages. The need to compensate skilled workers for the cost of their education and for the chance that they will not be successful in their chosen profession, for example, are offered as key reasons why wages might differ. I recommend you take a look at the chapter to get a handle on Smith's thinking.
This reasoning still forms part of our understanding of the modern labour market: if the wage premium for a job is not sufficient to compensate a worker for the (opportunity) cost of training to do that job then workers will not become trained and there will be a shortage of labour in the industry. This will drive up prices by natural market forces.
More generally, we now understand that wage differentials are an important means by which the market informs participants about how they should act. An extremely talented person who could, in principle, tranin to perform any of a large range of difficult jobs has no way to know where society needs his/her talents most. But the market provides this information by providing a mechanism for prices (i.e. wages) to increase in areas where skilled workers are short relative to prices in areas where workers are plentiful. The true beauty of this market mechanism is that is simultaneously provides information about the needs for workers, and provides the incentives for workers to enter the appropriate industries.
Whatever problems the wage gap might cause in the economy, they must be weighed against the large efficiency gains that come from allocated talent where it is needed most.