Carrier states and optical response in core–shell-like semiconductor nanostructures