The choice of article does not depend on optional information.
You would write either
Old books can be impressive. I like a book written a few centuries ago.
or
Old books can be impressive. I like a book (Hamlet) written a few centuries ago.
Providing the book's name in parentheses does not change the article. The same is true if you set the title of the book off with two commas.
Old books can be impressive. I like a book, Hamlet, written a few centuries ago.
However if you do not set the book's name off by parentheses or two commas, you would use the
Old books can be impressive. I like the book Hamlet, written a few centuries ago.
You use the because you are naming the book in the independent clause; you are not just providing the name as additional information, in parentheses or set off by commas, almost as a favor to the reader.
Notice that in this last sentence, the reduced relative clause (which was) written a few centuries ago is a non-restrictive relative clause. A non-restrictive relative clause itself provides optional information and can be deleted without changing the rest of the sentence.
Thus you can write
Old books can be impressive. I like the book Hamlet.
On the other hand, I can't think of a context in which
? Old books can be impressive. I like a book Hamlet
would be grammatical.
You could say
Old books can be impressive. I like a book called Hamlet.
Here you use a (make an indefinite reference) because your listener probably doesn't know which book you mean.
Old books can be impressive. I like the book called Hamlet.
Here you make a definite reference, perhaps because you wish to make 'the book called Hamlet' the topic of discussion.
In both these last two examples, you can also add the non-restrictive relative clause.