In short, yes, the leader of the opposition is free to choose who ever he wants to be in his shadow cabinet. The Shadow cabinet has no legally defined position. It is purely a matter of effective opposition to have someone responsible for shadowing each government position.
Similarly there are no required positions in the Cabinet (To be exact, there is no actual requirement for a cabinet at all, or even a Prime Minister) The convention and expectation is that there will be a Prime Minister, A Chancellor, Secretaries of State for Home and Foreign Affairs and a Minister or Secretary of State for each major function of Government: Defence, Education, Industry, Transport and so on. But it is entirely up to the Prime Minister to decide what the "major functions of government" are. For example recently the role of "Home affairs" was split between into "Home" and "Justice" roles. Sometimes "Energy" is part of the "Environment" job, sometimes it is part of the "Industry" job, and sometimes it is a separate role. Industrial training is transferred between "Education", "Industry" and "Business", according to the preferences of the Prime Minister.
The Department for Energy and Climate change was disbanded in 2016, with its functions being transfered to the Department for Business. The the Shadow Secretary of State, Barry Gardiner was moved horizontally to his current position as Shadow Secretary of State for International Trade (a position that was only created after Theresa May became Prime Minister and created the corresponding Department and Cabinet role.)