index for OR operator with different columns
If id is the primary key, any query with where id=:1 and (..whatever..) can effectively use the primary key index and retrieve, lookup only one row (if there is one.) It will then have to do the additional checks, the (..whatever..) but that is not going to be slow, since it's only one row.

If id was not the primary key, the situation might be different, depending on the selectivity of the 3 columns involved. The best index, would probably be two indexes, on (name, id) and on (lastname, id)

Oracle's optimizer can then use both indexes, doing an "index join". See the SQL-Fiddle.