Twoeggs I believe the IRS rule on selling shares is on a FIFO basis, i.e. the first shares purchased at a lower price are the shares that get sold 1st.
However, I believe you have the right to select specific inventory to sell but are required to notify the broker when selling. Now that most transactions are electronic, I believe prior to setllement, you can notify your broker who will state on the sale the specific purchase date.