npm v3 uses flat structure of dependencies. So I have some modules that use different versions of the same dependence. Is it any way to set, which version of this dependence would be in the root of
You can use npm shrinkrwap to override nested dependency versions, forcing all dependencies to use the same version.
From the docs:
This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be used when your package is installed.
Unfortunately there has been a long running issue with npm v3 and shrinkwrap. The ticket is still open, but the discussion does appear to include a branch that supposedly fixes the issue.