There is any difference between fiyat and masraf?
I think ücret is more like a charge, a fee and sometimes a wage. Fiyat is more likely to be used for goods and products whereas ücret is usually used for services or labor force.
And ücret also means price so it can be used as a synonym of fiyat as you said. But fiyat cannot always be used as a synonym of ücret.
And what about 'kitabın değeri'? Is that only used for its philosophical or spiritual worth or value, or its practical usefulness, or can it also simply refer to how much money it costs?
"Kitabın değeri" is not a common phrase. It can be "Kitabın fiyatı" or "Kitabın ücreti".
It sounds good for abstract money value of non-abstract things. For example if the book is a very ancient book or something like a book "antique", that means you cannot find a fixed price for it, so you may ask "Bu kitabın değeri ne?" to understand its value approximately. Or a new area, land, or ground that has not identified as "for sale" may not have a fixed value, so you can ask: "buralarda bir arsanın değeri nedir?"