I don't think this can be done using a Filter and of course you should keep in mind that files can get locked/unlocked anytime, so this would always be just snapshot that can change almost instantly.
This may be a way to do it:
Get-ChildItem -Path D:\Logs -File | ForEach-Object {
try {
$stream = $_.Open([System.IO.FileMode]::Open, [System.IO.FileAccess]::ReadWrite, [System.IO.FileShare]::None)
if ($stream) { $stream.Close() }
Write-Host "File $($_.FullName) is currently not locked" -ForegroundColor Green
}
catch {
Write-Host "File $($_.FullName) is currently locked" -ForegroundColor Red
# emit the locked fileInfo object?
$_
}
}