I am an author, and I have books stored with me. Is it permissible to pay my zakat in the form of books containing beneficial knowledge for poor students, such as chemistry and mathematics, or religious books that spread Islamic sciences?
Zakat on wealth must be paid in cash from the wealth itself. Therefore, you should pay your zakat in monetary form so that the poor can purchase what they need. And Allah Knows Best.
Is it permissible for one to masturbate in order not to commit fornication?
This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.
I want to buy a house by having a loan from a bank?
If taking a loan from usrious banks it is impermissible; on the other hand, if this took place through Islamic ones then it is permissible to get the loan, since Allah the Most Exalted Said (What means): "And Allah has made buying lawful and forbidden usury (riba)." And Allah Knows Best.
What is the ruling on performing voluntary prayers during official working hours?
All perfect praise be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muhammad and upon all of his family and companions
There is no harm if there was break time during official working hours, but if not then it is impermissible. And Allah Knows Best.