Marx did have a concept of human nature. His basic understanding of the nature of man is that man is an active being who is compelled to work on and interact with the natural world in order to secure the things he needs to survive, and in putting forward that perspective Marx distinguished himself from Feuerbach, amongst others, who, in Marx's views, did not acknowledge how the natural world is changed throughout history as a result of man's action on it as well as how man himself is changed and transformed as a result of his ongoing interaction with the world around him. In putting forward his conception of human nature, which receives its most advanced expression in The German Ideology and the 1844 Manuscripts whilst also being an important part of his other works, Marx was concerned not only with giving an empirical characterization of man's condition, but also provided a basis for the moral critique of capitalism, in that capitalism involves the subversion of man's active nature, as man finds that the products of his labour come to dominate and control him, and ceases to recognize them as the product of human activity.
I stress Marx's concept of human nature because it is also relevant to your actual question. Marx certainly did not believe that human actions and ideas are determined by material conditions, rather, it is the state of the productive forces and the relations of production that determine the constraints within which man is free to act at different points in history. The productive forces are the existing condition of man's technology, knowledge, and the other resources that allow man to exploit the natural world, whereas the relations of production are the relations of effective ownership and control over human labour and the productive forces, that is, the way in which production is organized, in specific societies, and depending on the level of the productive forces. It is the latter of these, the relations of production, that comprise the basis from which what Marx terms the superstructure emerges, but this is not meant to be a deterministic relationship, in that Marx does not think that all capitalist societies automatically have the same political institutions, for example, and it is probably not the case that Marx includes things like ideas as part of the superstructure. For Marx, then, human beings retain the freedom to act within wide-ranging constraints. Or, as he puts it in The Eighteenth Brumaire (1852), "men make their own history, but they do not make it as they please; they do not make it under self-selected circumstances, but under circumstances existing already, given and transmitted from the past".


