Irish pronunciation with double vowels
I've read in a few places that generally when there's two vowels one after the other, you can "choose" which to pronounce. So for example, "fear" can be pronounced more like "fair" or like "far". Similarly, "bean" can be "bairn" or "bahn". Is this right? Are there exceptions? How does it work when one vowel is accented?
The ea combination is something of a special case, in that the “choice” probably depends upon which Irish dialect is used. In the case of fear, one would be likeliest to hear “fyair” (/fʲɛɾˠ/) in the east of Ulster, and “fyarr” (/fʲaɾˠ/) in Munster, Connacht, and the west of Ulster. Similarly, Seán would tend to be heard as “Shane” (/ʃeːnˠ/) in the east of Ulster, “Shann” (/ʃæːnˠ/) in the west of Ulster, and “Shawn” (/ʃɑːnˠ/) elsewhere.
Other than ea, two (or three) consecutive vowels will have a standard pronunciation in a dialect, and a vowel with a fada will “override” the pronunciation of adjacent vowels.
As galaxy states, it's pretty much a case-by-case basis, with no hard rule. In your two instances, only the second vowel is sounded, but in "oiche" for example, the initial sound effectively combines both, but once you come across more such words, you innately grasp which is dominant.
Apologies for this: I'm going to go a bit in-depth into linguistics to explain what's going on.
The rules are a little complicated, but pretty systematic for the most part. The big issue with Irish is that it's using the vowels to do two things at the same time: represent the vowel sounds themselves and also represent the quality of the consonants around them.
Technically, 'fear' and 'bean' both have the same vowel sound in the middle, but the 'r' and the 'n' at the end of both words end up colouring the vowel sound in both words in different dialects. The vowels in 'fear' ([ɑ:]) and 'bean' ([æ:]) are what are referred to as allophones of the one sound (/a:/), the sound (phone) are technically different, but are treated as if they're the same sound (phoneme) in the language. English has lots of examples of this. Consider the unvoiced consonants English: when they appear at the beginning of a word, they're aspirated, but otherwise they're not. If you listen to the words 'spill' and 'pill', you'll notice that in 'pill' the 'p' is followed by a puff of air, whereas in 'spill' it isn't. However to most English speakers, they can't hear the difference.
So, that's why they sound different but technically aren't considered as having different sounds.
The accent (called the 'síneadh fada', which means 'long sign') indicates that the vowel cluster represents a long vowel. As Jillianimal pointed out, the character on which the vowel sits indicates the actual sound the cluster has. Thus, if you see 'ói', that mean the cluster has a long 'o' sound, but 'oí' would have a long 'i' sound. The 'o' in both cases indicates that the preceding consonant cluster was broad (unpalatalised), and the 'i' indicates that the following consonant cluster will be slender (palatalised). 'oíche', as PaulCulloty mentioned, is an example of this: it start with 'oí', so the sound is a long 'i' sound. Going backwards from speech to writing is a bit more complicated in this case as because the sound at the start of the word is a long 'i' sound, it could be written 'oí', 'í', or 'aoi', all of which are used to represent the same sound.
As to what the vowel clusters mean in the written language, the article on Irish orthography in Wikipedia is very good: https://en.wikipedia.org/wiki/Irish_orthography
Once you get used to it, the system is actually pretty intuitive, in spite of how baroque it is. In 90% of cases, you can predict from the sound of a word how it will be spelled and vice versa.
I can explain what's going on further, if you want, or if I've overcomplicated anything, I can clarify anything I've written for you.