What kind of deadlock the deadlock_timeout config parameter detects in Postgresql?
A deadlock is a situation where multiple transactions conflict which each other in the locks they have cross-acquired. That situation is impossible to solve without aborting one of the transactions. The engine aborts such a transaction  with ERRCODE_T_R_DEADLOCK_DETECTED as the error.

The log_lock_waits is not primarily related to deadlocks, it's meant to alert about the situation that some queries are stuck waiting for locks, meaning that other transactions keep locks for too long.


  Are these actually two different types of deadlocks that are detected?


No. It seems you're confusing locks and deadlocks here.


  Is there a way to get an error when deadlock_timeout based deadlock detection happens?


It's automatic. If that error does not arise, it's because there is no deadlock.


  How can actually a ERRCODE_T_R_DEADLOCK_DETECTED error be forced to 
  happen?


By creating an actual deadlock with at least two transactions conflicting. See postgres deadlock without explicit locking on S.O. for a simple example.