Fields are required, except if all fields are empty
You have two situations where input is invalid:


fieldD is empty and one or more are empty
fieldD is not empty and one ore more are empty


This makes that you have to check for different situations and so your if-statement cannot really be shortened to one statement.

What you also can do is loop over the fields and do a count of the empty fields and validate this:

$emptyFields = 0;

foreach(array($fieldA, $fieldB, $fieldC, $fieldD)as $field) {
    if ($field === '') {
        $emptyFields++;
    }
}

if ($emptyFields === 4 || $emptyFields === 0 || ($emptyFields === 1 &amp;&amp; $fieldD === '')) {
    //input is VALID
}