So a priest HAS to celebrate mass for a solemnity and a feast day?
No, he does not have to celebrate Mass. If he does the following rule applies: he must follow his own proper calendar. If he’s a diocesan priest he must follow his diocese’s calendar. If he’s a regular priest he follows the calendar of his order/congregation or, if it has it’s own calendar, the calendar of his province, region, etc. We could get into more details, e.g. if a regular priest is appointed as the parish priest (pastor in North America) of a parish in a diocese he must celebrate public Masses according to the diocesan calendar.
If a priest celebrated Mass in my diocese yesterday he would have had to celebrate the Mass of the Solemnity of the Assumption. He couldn’t have opted for another Mass.
Can a feast day be optional?
Technical issue: if it’s a holy day with the rank of feast - no the feast must be observed. If you mean feast day in a generic sense meaning “holy day” it depends - only optional memorials are optional.
What are the obligatory memorials?
They are holy days with the rank of memorial. Of the three ranks of holy day this is the most junior in rank. Obligatory memorials have to be observed. They don’t normally have their own propers instead commons are used.
The “rules” above are generalised. Exceptions can be made for the likes of Ritual Masses (baptism, confimation, weddings, ordinations, etc.), Masses for Various Needs and Occasions, Votive Masses and Requiem Masses - but that’s getting more complicated than I suspect you want.
I did not know that a priest has to say the liturgy of the hours.
Yes, they do on a minimum of five occasions -
Lauds: in the morning
Terce, Sext or None: one of these in the middle of the morning, midday or mid-afternoon, respectively
Vespers: in the evening
Compline: before going to bed:
Office of Readings: at any time