This is a good, somewhat complex question, and you may get as many different answers as there are Marxists.
First, though Marx had a background in German Idealism, through which he analyzed British political-economy, it is a bit hard to come grips with his "materialism." He tends to place the material base of production prior to the "intellectual" superstructure, but he does obviously accept "conditioned" mental agency in history. The "theoria-praxis" divide gets entangled under the convenient term "dialectics." In any case, yes, the material transformation of history will presumably bring about a new social-mental framework, a new human setting for the first time liberated from necessary class antagonisms and all their cultural, psychological ramifications.
But the question of historical cause and effect is cloudier. I believe Marx saw the transformation of history in almost steam-age, thermodynamic terms, a mass pressuring of outcomes. Remember that Marx was basically an analyst of capitalism and modernity, he really did not specify any political program or revolutionary practice. After the Second International, Lenin and others lost faith in the spontaneous "revolution from below," and saw the "Vanguard Party" as providing the necessary intelligent agency to guide any revolution.
You are right, Marx did see capitalism as a necessary prelude to socialism, and doubted Marxism could work in an agricultural society like Russia. Capitalism, by brutal means, does accomplish "commodity" farming, the uprooting of farm labor, and the utter dependence of each member of society upon a vast, complex division of labor. This in turn broke the ancient Malthusian constraints of population and "nature." Through complex manufacturing, humans could for the first time accumulate wealth by reorganizing unattached people, the proletariate.... without more land! That is the crucial leap. There was no necessity to grow a society by seizing the land of another society. Enlightened, scientific human capacities pass beyond the bloody, zero-sum game of history.
Socialization of production meant socialization of the state. Because of this division and rationalization of labor, this utter dependence on cooperation, it was only rational that human beings would begin to seek their own well-being in complex cooperation and common interest, at last eliminating the final remnants of divisive exploitation in the form of the capitalist class...the class who may or may not choose to work, but who, in their purest form, are simply "legal owners," shareholders whose legal share of social output will only grow whether or not they work. Since this underlying antagonism and alienation suffuse modern culture, the "revolution" will surely entail a new intellectual outlook, epoch, or secularized Geist.
Again, the question is the intellect as historically causal. Not even the most adamant "vanguardist" would argue that you can carry out a top-down revolution without the necessary historical conditions, which must include a high development of commodity production and some level of awareness, willingness, and confidence on the part of the proletariate. Yet mind is also the catalyst of material change. Like a Hegelian subject, the proletariate can only become its true, rational self precisely by passing through the material conditions of revolution, and only afterwards knowing "intellectually" what it has become.
The complex dialectic of "theoria-praxis" or "base-superstructure" in Marxism is not unlike a social version of the old "mind-body" problems that philosophy can never fully resolve.