Stereoselective synthesis of highly substituted 8-oxabicyclo[3.2.1]octanes and 2,7-dioxatricyclo[4.2.1.03,8]nonanes