I think you are thinking of some distinctive names used by nobles and bishops. Some (many?) of them have distinctive suffix like 〜[小路]{こうじ}, 〜[坊]{(の)ぼう}, 〜[寺]{じ}, and so on, and because of these suffixes, the names tend to get longer for them.
Note that there's a plenty of two-character surnames, such as [徳川]{とくがわ}, [藤原]{ふじわら}, [近衛]{このえ}, etc. that are used by nobles, and peasants also sometimes use a prefix/suffix such as [大]{おお}/[小]{こ}〜 (such as [大曽根]{おおそね}, [小日向]{こひゅうが/こひなだ}), so I don't think one could say the upper class had a longer surname.
The following section added after a comment by jmac
As I wrote, I just don't agree with your premise that the upper class had a longer surname. After all, when we say everyone got their 名字 in 明治 era, it's not like a whole bunch of new names were suddenly invented out of thin air. The majority of the names were pre-existing names.
Take a look at this for example, and you see a long list of two character names that are nobles and samurais. Same for war lords in the Edo period. I think it'd be hard to claim that they have a higher average character count in their surnames than people today.
By the way, 長谷川 goes back a long time, and so does 佐々木. And you might be also intereted in playing with http://myoji-yurai.net/ or http://home.r01.itscom.net/morioka/myoji/best200.html that gives you some information about the origins of those names --- can't vouch for their accuracies, though.